package com.yang.SpringTest.annotation.beanLearn;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * <p>配置类</p>
 *
 * @author By: chengxuyuanshitang
 * Package com.yang.SpringTest.bean
 * Ceate Time 2024-03-12 16:15
 */
@Configuration
@ComponentScan(basePackages = "com.yang.SpringTest.bean")
public class BeanDemoConfig {
    @Bean(initMethod = "init", destroyMethod = "destroy")
    public BeanDemo user() {
        return new BeanDemo();
    }
}
